#ifndef MENU_H
#define MENU_H
#include <vector>
#include <fstream>
#include <iostream>
#include "MD5.h"
#include "Book.h"
#include "Member.h"

struct Librarian
{
	std::string name;
	std::string password;

	Librarian(std::string name_, std::string password_) : name(name_), password(password_){}
};

class Menu
{
	public:
		Menu(){}
		~Menu();
		void LoadData();
		void Login();
		void Run();
		void SaveData();
		
	private:
		std::vector<Book*> books;
		std::vector<Member*> members;
		std::vector<Librarian*> librarians;
		void ShowMenu();
		void AddNewMember();
		void AddNewBook();
		void ListMembers();
		void ListBooks();
		void SearchMember();
		void SearchBook();
		void DeleteMember();
		void DeleteBook();
		void ModifyMemberAttributes(Member* mem);
		void BorrowBook();
		void ReturnBook();
		Member* SearchMemberByID(std::string id);
		Book* SearchBookByID(std::string id);
		void ShowBookMenu();
		void ShowMemberMenu();
		void ShowLoaningMenu();
};

#endif